package io.adrainty.bolee.security.models.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author AdRainty
 * @version V1.0.0
 * @since 2025/8/10 下午3:27
 */

@Builder
@Data
@Schema(description = "获取菜单")
@NoArgsConstructor
@AllArgsConstructor
public class MenuEntity implements Serializable {
    
    @Serial
    private static final long serialVersionUID = 3646246119154100045L;

    private Long id;

    @Schema(description = "路由名字")
    private String name;

    @Schema(description = "请求路径")
    private String path;

    @Schema(description = "高亮子菜单")
    private String redirect;

    @Schema(description = "模块跳转目标")
    private String component;

    // 当设置 true 的时候该路由不会在侧边栏出现 如401，login等页面，或者如一些编辑页面/edit/1
    @Schema(description = "是否显示")
    private Boolean hidden;

    @Schema(description = "子菜单")
    private List<MenuEntity> children;

    @Schema(description = "meta属性")
    private MenuMetaEntity meta;
    
}
